﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using UnityEngine.Playables;

public abstract class AnimBehaviour
{
    public bool enable { get; protected set; }

    protected Playable adapterPlayable;

    public AnimBehaviour(PlayableGraph graph)
    {
        adapterPlayable = ScriptPlayable<AnimAdapter>.Create(graph);
        ((ScriptPlayable<AnimAdapter>)adapterPlayable).GetBehaviour().Init(this);
    }

    public virtual void Enable()
    {

    }
    public virtual void Disable()
    {

    }
    public void Execute(Playable playable, FrameData info)
    {
        if (!enable) return;

    }

    public Playable GetAnimAdapterPlayable()
    {
        return adapterPlayable;
    }
}
